<!doctype html>
<%bean.DataBaseConnection conn = new bean.DataBaseConnection();%>

<jsp:useBean id="pemesan" scope="session" class="bean.Pemesan"/>
<%@ page import="java.sql.*" %>

<%@ page import="java.io.*"%>

<%

            Connection con = null;
            //String dbname = "jdbc:oracle:thin:@localhost:1521:XE";
            String dbname = "jdbc:oracle:thin:@172.23.9.185:1521:ORCL";
            String status = "";
            ResultSet rs = null;
            try {
                Class.forName("oracle.jdbc.driver.OracleDriver");
               // con = DriverManager.getConnection(dbname, "hr", "hr");
               con = DriverManager.getConnection(dbname, "MHS105314093", "MHS105314093 ");
                if (con == null) {
                    status = "gagal";
                } else {
                    status = "berhasil";
                }
            } catch (ClassNotFoundException ex) {
                status = "Driver Error";
            } catch (SQLException ex) {
                status = "gagal";
            }
            Statement st = con.createStatement();
            String kueri = "SELECT * FROM rplopesanan";
            rs = st.executeQuery(kueri);

%>



<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>JSP Page</title>
    </head>

    <body>
    <style type="text/css">
            #main{
                border: solid;
                color: blue;
                background:white;
                font-weight: bold;
                margin-top: 100px;
                margin-left:120px;
                margin-right:127px;
                margin-bottom:135px;
                padding-right:60px; }

            #menuhor {
                list-style-type: none;
                margin: 0;
                padding: 0;
                float: center;
            }

            #menuhor li {
                margin: 0;
                padding: 0;
                float:left;
                text-align : center;
            }

            #menuhor a {
                display: block;
                width : 247px;
                color: #FFF;
                float : center;
                text-decoration: none;
                line-height:2.5;
                border-right: 3px solid white;
            }

            #menuhor a:hover {
                background: cyan;
            }
            #konten_utama{
                background-color:white;}

            #menuver{
                list-style-type: none;
                margin-left:-40px;
                margin-right:30px;
                padding:0;
                width : 170px;
                background-color:white;
                float:left;
            }
            #menuver li {
                margin:0;
                padding:0;
                float:center;
                text-align : center;
            }
            #menuver a {
                display:block;
                color:#FFF;
                text-decoration:none;
                padding:0.15px;
                line-height: 2.5;
                border-bottom: 3px solid white;
            }
            #menuver a:hover {
                background: cyan;
            }
            #footer{
                font-size: 14px;
                border: solid;
                color: blue;
                clear:both;
                text-align: center;
                background: white;
                margin-top: 350px;
                margin-bottom: 50px;
                height:70px;
                width :950px;
                float:center;

            }
            #konten{
                float:left;

                color: black;
                background: white;
                height:400px;
                width :730px
            }



        </style>
    <body background ="background1.jpg">
        <ul id="main">
            <form method="post" action="halamanKonfirmasi.jsp">
                <center><img src="banner.jpg"width="1000" height="300">

                    <br>
                    <ul id="menuhor" style="position:absolute;right:7px;left:173px;top:345px">
                        <font face="Comic sans MS">
                            <li><a href="HalamanAdmin.jsp"><font color="Blue">Home</a> </li>
                            <li><a href="HalamanPesanan.jsp"><font color="Blue">Pesanan</blink></a> </li>
                            <li><a href="Uploadwisataform.jsp"><font color="Blue">Wisata</blink></a></li>
                            <li><a href="HalamanUtama.jsp"><font color="Blue">Logout</blink></a></li>
                    </ul><br><br><hr>

                    <ul id="konten_utama">

                        <ul id="menuver">
                            <center> Klik the link below to view packet travel</center>
                            <br>
                            <li><a href="HalamanWisata.jsp"><Marquee><font color="Blue">view packet travel </Marquee></a> </li>
                            <br>
                            </ul>

                        <ul id="konten">

                            <p align="center"><strong><font size="6">DATA Pesanan</font>
                                </strong></p>
                            <div align="center">
                              
                                <table width="58%" border="1">
                                    <tr bordercolor="#666666" bgcolor="#999999">
                                        <td width="5%">Id</td>
                                        <td width="7%">Nama</td>
                                        <td width="70%">Alamat</td>
                                        <td width="5%">No Tlp</td>
                                        <td width="5%">Email</td>
                                        <td width="13%">Tanggal</td>
                                        <td width="13%">Gender</td>
                                        <td width="13%">Paket</td>
                                        <td width="13%">Status</td>
                                        <td width="13%">Edit</td>
                                        <td width="13%">Delete</td>
                                    </tr>
                                    <%

                                                if (rs != null) {
                                                    while (rs.next()) {
                                                        String id = rs.getString(1);
                                                        String nama = rs.getString(2);
                                                        String alamat = rs.getString(3);
                                                        String notlp = rs.getString(4);
                                                        String email = rs.getString(5);
                                                        String tanggal = rs.getString(6);
                                                        String gender = rs.getString(7);
                                                        String paket = rs.getString(8);
                                                        String Status = rs.getString(9);


                                    %>
                                    <tr>
                                        <td><%=id%></td>
                                        <td><%=nama%></td>
                                        <td><%=alamat%></td>
                                        <td><%=notlp%></td>
                                        <td><%=email%></td>
                                        <td><%=tanggal%></td>
                                        <td><%=gender%></td>
                                        <td><%=paket%></td>
                                        <td><%=Status%></td>

                                        <td><a
                                                href="EditData.jsp?id=<%=id%>&nama=<%=nama%>&alamat<%=nama%>&notlp<%=notlp%>&email<%=email%>
                                                &tanggal<%=tanggal%>&gender=<%=gender%>&paket<%=paket%>&status<%=Status%>">EDIT</a></td>
                                        <td><a
                                                href="DeleteData.jsp?id=<%=id%>">DELETE</a></td>
                                    </tr>
                                    <% }
                                                }
                                                st.close();
                                                con.close();


                                    %>
                                </table>

                            </div>
                            </body>
                            </html>

                            </form></center>
                            <ul id="footer">

                                Queries Executed: 0 queries | Page Generation Time: 0.00265 seconds <br>
                                Travel Agent 2.0.4 Beta 10 (Revision 363). Coded by Ardy. Skin coded by Amel and designed by Fave, Hohok
                                All registered trademarks belong to their respective owners. Travel Agent Online and all related content are trademark of Gravity CO. Ltd.
                            </ul></font>

                            </body>
                            </html>

